import React, { useEffect, useMemo, useState } from 'react'
import { Button, Input } from 'antd-mobile'

const App = () => {
   const [value, setValue] = useState('')


  const user_id=1;
  const server_id=7788;

  // const ws=useMemo(()=>{
  //   return  WebSocket(
  //       `ws:124.221.74.149:8003/koa/ws?user_id=${user_id}&server_id=${server_id}`
  //   )
  // })
  // useEffect(()=>{
  //   ws.onplay=()=>{
  //     console.log("链接成功");
  //   }
  // },[])
   
  return (
    <div>
      <div className='Wsck'>
        <div className='Wsck-left'>
          <div className='avar'><img src='vite.svg' alt='' /></div>
          <div className='Wsck-name'>哈哈哈哈啊哈哈哈哈</div>
        </div>
        <div className='Wsck-right'>
          <div className='avar'><img src='vite.svg' alt='' /></div>
          <div className='Wsck-name'>哈哈哈哈啊哈哈哈哈</div>
        </div>
      </div>
      <div className='box'>
      <div className='Input'>
       <Input
          placeholder='请输入内容'
          value={value}
          onChange={val => {
            setValue(val)
          }}
        />
      </div>
       
        <Button className='btn'>发送</Button>
      </div>
    </div>
  )
}

export default App
